warnings.warn("the frombuffer defaults may change in a future release; for portability, change the call to read:\n frombuffer(mode, size, data, 'raw', mode, 0, 1)", RuntimeWarning, stacklevel = 2)
args = (mode, 0, -1)
if args[0] in _MAPMODES:
im = new(mode, (1, 1))
im = im._new(core.map_buffer(data, size, decoder_name, None, 0, args))